import random
c = 'abcdefghijklmnopqrstuvwxyz'

words = [random.choice(c) + random.choice(c) for i in range(100)]

d = {}

for j in words:
    d[j] = d.get(j,0) + 1

nlist = sorted(d.items(), key = str, reverse=True)
print(nlist)

# 次数排序没有做好